import '../bs/build_serialize'

let build_serialize = window.namespace.build_serialize;

// 账号登陆消息
class bs_account_login extends build_serialize.bs_message_t {

    // wolegequ
    get u8() {
        return this.u8_.value_;
    }
    // wolegequ
    set u8(_vl) {
        this.u8_.value_ = _vl;
    }
    // wolegequ1
    get u16() {
        return this.u16_.value_;
    }
    // wolegequ1
    set u16(_vl) {
        this.u16_.value_ = _vl;
    }
    // wolegequ1
    get u32() {
        return this.u32_.value_;
    }
    // wolegequ1
    set u32(_vl) {
        this.u32_.value_ = _vl;
    }
    // wolegequ1
    get i8() {
        return this.i8_.value_;
    }
    // wolegequ1
    set i8(_vl) {
        this.i8_.value_ = _vl;
    }
    // wolegequ1
    get i16() {
        return this.i16_.value_;
    }
    // wolegequ1
    set i16(_vl) {
        this.i16_.value_ = _vl;
    }
    // wolegequ1
    get i32() {
        return this.i32_.value_;
    }
    // wolegequ1
    set i32(_vl) {
        this.i32_.value_ = _vl;
    }
    // wolegequ1
    get i64() {
        return this.i64_.value_;
    }
    // wolegequ1
    set i64(_vl) {
        this.i64_.value_ = _vl;
    }
    // wolegequ1
    get i8_array() {
        return this.i8_array_.value_;
    }
    // wolegequ1
    set i8_array(_vl) {
        this.i8_array_.value_ = _vl;
    }
    // wolegequ1
    get i8_list() {
        return this.i8_list_.value_;
    }
    // wolegequ1
    set i8_list(_vl) {
        this.i8_list_.value_ = _vl;
    }
    // wolegequ1
    get ustring() {
        return this.ustring_.value_;
    }
    // wolegequ1
    set ustring(_vl) {
        this.ustring_.value_ = _vl;
    }
    // wolegequ1
    get ustring_list() {
        return this.ustring_list_.value_;
    }
    // wolegequ1
    set ustring_list(_vl) {
        this.ustring_list_.value_ = _vl;
    }

    constructor() {
        super();
        // wolegequ
        this.u8_ = new build_serialize.bs_crt_uint8(32);
        // wolegequ1
        this.u16_ = new build_serialize.bs_crt_uint16();
        // wolegequ1
        this.u32_ = new build_serialize.bs_crt_uint32();
        // wolegequ1
        this.i8_ = new build_serialize.bs_crt_int8();
        // wolegequ1
        this.i16_ = new build_serialize.bs_crt_int16();
        // wolegequ1
        this.i32_ = new build_serialize.bs_crt_int32();
        // wolegequ1
        this.i64_ = new build_serialize.bs_crt_int64();
        // wolegequ1
        this.i8_array_ = new build_serialize.bs_list_st(build_serialize.bs_crt_int8.new_helper);
        // wolegequ1
        this.i8_list_ = new build_serialize.bs_list_st(build_serialize.bs_crt_int8.new_helper);
        // wolegequ1
        this.ustring_ = new build_serialize.bs_ustring_u('33333333333');
        // wolegequ1
        this.ustring_list_ = new build_serialize.bs_list_st(build_serialize.bs_ustring_u.new_helper);
    }

    child_length() {
        return this.u8_.length() +
            this.u16_.length() +
            this.u32_.length() +
            this.i8_.length() +
            this.i16_.length() +
            this.i32_.length() +
            this.i64_.length() +
            this.i8_array_.length() +
            this.i8_list_.length() +
            this.ustring_.length() +
            this.ustring_list_.length();
    }

    child_serialize(_stream_help) {
        return this.u8_.serialize(_helper) &&
            this.u16_.serialize(_helper) &&
            this.u32_.serialize(_helper) &&
            this.i8_.serialize(_helper) &&
            this.i16_.serialize(_helper) &&
            this.i32_.serialize(_helper) &&
            this.i64_.serialize(_helper) &&
            this.i8_array_.serialize(_helper) &&
            this.i8_list_.serialize(_helper) &&
            this.ustring_.serialize(_helper) &&
            this.ustring_list_.serialize(_helper);
    }

    child_build(_stream_help) {
        return this.u8_.build(_helper) &&
            this.u16_.build(_helper) &&
            this.u32_.build(_helper) &&
            this.i8_.build(_helper) &&
            this.i16_.build(_helper) &&
            this.i32_.build(_helper) &&
            this.i64_.build(_helper) &&
            this.i8_array_.build(_helper) &&
            this.i8_list_.build(_helper) &&
            this.ustring_.build(_helper) &&
            this.ustring_list_.build(_helper);
    }

}

window['namespace'] = window['namespace'] || {};
window['namespace']['message'] = window['namespace']['message'] || {};
window['namespace']['message']['login'] = window['namespace']['message']['login'] || {};

let login = window['namespace']['message']['login'];
login['bs_account_login'] = bs_account_login;
